//
// RootFS.cpp
// Usage: Root file system
// CreateDate: 2009-05-06
// Author: MaJiuyue
//
#include "RootFS.h"

RootFS::RootFS()
	: FileSystem("RootFS")
{
	// Root File
	root = new Directory("RootFS", 0, 3, this);

	// Sub dir
	root->AddEntry(new Directory("root", 1, 0, this));
	root->AddEntry(new Directory("dev", 1, 0,  this));
	root->AddEntry(new Directory("initrd", 1, 0,  this));
}

RootFS::~RootFS()
{
	delete root;
}

int RootFS::read(u32 inode, off_t off, size_t size, addr_t buf)
{
	return 0;
}

int RootFS::write(u32 inode, off_t off, size_t size, addr_t buf)
{
	return 0;
}

File * RootFS::TraversalPath(Directory *target, const char *path)
{
	return NULL;
}

